home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
IMM.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-02-13
|
27KB
|
596 lines
{*******************************************************}
{ }
{ Delphi Run-time Library }
{ Windows 32bit API Interface Unit }
{ }
{ Copyright (c) 1996 Borland International }
{ }
{*******************************************************}
unit Imm;
{$A+,Z+}
interface
uses Windows;
const
VK_PROCESSKEY = $E5;
type
HIMC = Integer;
{$nonamespace HIMC}
PCompositionForm = ^TCompositionForm;
tagCOMPOSITIONFORM = record
dwStyle: DWORD;
ptCurrentPos: TPOINT;
rcArea: TRECT;
end;
{$nonamespace tagCOMPOSITIONFORM}
TCompositionForm = tagCOMPOSITIONFORM;
PCandidateForm = ^TCandidateForm;
tagCANDIDATEFORM = record
dwIndex: DWORD;
dwStyle: DWORD;
ptCurrentPos: TPOINT;
rcArea: TRECT;
end;
{$nonamespace tagCANDIDATEFORM}
TCandidateForm = tagCANDIDATEFORM;
PCandidateList = ^TCandidateList;
tagCANDIDATELIST = record
dwSize: DWORD;
dwStyle: DWORD;
dwCount: DWORD;
dwSelection: DWORD;
dwPageStart: DWORD;
dwPageSize: DWORD;
dwOffset: array[1..1] of DWORD;
end;
{$nonamespace tagCANDIDATELIST}
TCandidateList = tagCANDIDATELIST;
PRegisterWordA = ^TRegisterWordA;
PRegisterWordW = ^TRegisterWordW;
PRegisterWord = PRegisterWordA;
tagREGISTERWORDA = record
lpReading: PAnsiChar;
lpWord: PAnsiChar;
end;
{$nonamespace tagREGISTERWORDA}
TRegisterWordA = tagREGISTERWORDA;
tagREGISTERWORDW = record
lpReading: PWideChar;
lpWord: PWideChar;
end;
{$nonamespace tagREGISTERWORDW}
TRegisterWordW = tagREGISTERWORDW;
TRegisterWord = TRegisterWordA;
const
STYLE_DESCRIPTION_SIZE = 32;
type
PStyleBufA = ^TStyleBufA;
PStyleBufW = ^TStyleBufW;
PStyleBuf = PStyleBufA;
tagSTYLEBUFA = record
dwStyle: DWORD;
szDescription: array[0..STYLE_DESCRIPTION_SIZE-1] of AnsiChar;
end;
{$nonamespace tagSTYLEBUFA}
TStyleBufA = tagSTYLEBUFA;
tagSTYLEBUFW = record
dwStyle: DWORD;
szDescription: array[0..STYLE_DESCRIPTION_SIZE-1] of WideChar;
end;
{$nonamespace tagSTYLEBUFW}
TStyleBufW = tagSTYLEBUFW;
TStyleBuf = TStyleBufA;
{ prototype of IMM API }
function ImmInstallIMEA(lpszIMEFileName, lpszLayoutText: PAnsiChar): HKL; stdcall;
function ImmInstallIMEW(lpszIMEFileName, lpszLayoutText: PWideChar): HKL; stdcall;
function ImmInstallIME(lpszIMEFileName, lpszLayoutText: PChar): HKL; stdcall;
function ImmGetDefaultIMEWnd(hWnd: HWND): HWND; stdcall;
function ImmGetDescriptionA(hKl: HKL; PAnsiChar: PAnsiChar; uBufLen: UINT): UINT; stdcall;
function ImmGetDescriptionW(hKl: HKL; PWideChar: PWideChar; uBufLen: UINT): UINT; stdcall;
function ImmGetDescription(hKl: HKL; PChar: PChar; uBufLen: UINT): UINT; stdcall;
function ImmGetIMEFileNameA(hKl: HKL; PAnsiChar: PAnsiChar; uBufLen: UINT): UINT; stdcall;
function ImmGetIMEFileNameW(hKl: HKL; PWideChar: PWideChar; uBufLen: UINT): UINT; stdcall;
function ImmGetIMEFileName(hKl: HKL; PChar: PChar; uBufLen: UINT): UINT; stdcall;
function ImmGetProperty(hKl: HKL; dWord: DWORD): DWORD; stdcall;
function ImmIsIME(hKl: HKL): Boolean; stdcall;
function ImmSimulateHotKey(hWnd: HWND; dWord: DWORD): Boolean; stdcall;
function ImmCreateContext: HIMC; stdcall;
function ImmDestroyContext(hImc: HIMC): Boolean; stdcall;
function ImmGetContext(hWnd: HWND): HIMC; stdcall;
function ImmReleaseContext(hWnd: HWND; hImc: HIMC): Boolean; stdcall;
function ImmAssociateContext(hWnd: HWND; hImc: HIMC): HIMC; stdcall;
function ImmGetCompositionStringA(hImc: HIMC; dWord1: DWORD; lpBuf: pointer; dwBufLen: DWORD): Longint; stdcall;
function ImmGetCompositionStringW(hImc: HIMC; dWord1: DWORD; lpBuf: pointer; dwBufLen: DWORD): Longint; stdcall;
function ImmGetCompositionString(hImc: HIMC; dWord1: DWORD; lpBuf: pointer; dwBufLen: DWORD): Longint; stdcall;
function ImmSetCompositionStringA(hImc: HIMC; dwIndex: DWORD; lpComp: pointer; dwCompLen: DWORD; lpRead: pointer; dwReadLen: DWORD):Boolean; stdcall;
function ImmSetCompositionStringW(hImc: HIMC; dwIndex: DWORD; lpComp: pointer; dwCompLen: DWORD; lpRead: pointer; dwReadLen: DWORD):Boolean; stdcall;
function ImmSetCompositionString(hImc: HIMC; dwIndex: DWORD; lpComp: pointer; dwCompLen: DWORD; lpRead: pointer; dwReadLen: DWORD):Boolean; stdcall;
function ImmGetCandidateListCountA(hImc: HIMC; var ListCount: DWORD): DWORD; stdcall;
function ImmGetCandidateListCountW(hImc: HIMC; var ListCount: DWORD): DWORD; stdcall;
function ImmGetCandidateListCount(hImc: HIMC; var ListCount: DWORD): DWORD; stdcall;
function ImmGetCandidateListA(hImc: HIMC; deIndex: DWORD; lpCandidateList: PCANDIDATELIST; dwBufLen: DWORD): DWORD; stdcall;
function ImmGetCandidateListW(hImc: HIMC; deIndex: DWORD; lpCandidateList: PCANDIDATELIST; dwBufLen: DWORD): DWORD; stdcall;
function ImmGetCandidateList(hImc: HIMC; deIndex: DWORD; lpCandidateList: PCANDIDATELIST; dwBufLen: DWORD): DWORD; stdcall;
function ImmGetGuideLineA(hImc: HIMC; dwIndex: DWORD; lpBuf: PAnsiChar; dwBufLen: DWORD): DWORD; stdcall;
function ImmGetGuideLineW(hImc: HIMC; dwIndex: DWORD; lpBuf: PWideChar; dwBufLen: DWORD): DWORD; stdcall;
function ImmGetGuideLine(hImc: HIMC; dwIndex: DWORD; lpBuf: PChar; dwBufLen: DWORD): DWORD; stdcall;
function ImmGetConversionStatus(hImc: HIMC; var Conversion, Sentence: DWORD): Boolean; stdcall;
function ImmSetConversionStatus(hImc: HIMC; Conversion, Sentence: DWORD): Boolean; stdcall;
function ImmGetOpenStatus(hImc: HIMC): Boolean; stdcall;
function ImmSetOpenStatus(hImc: HIMC; fOpen: Boolean): Boolean; stdcall;
function ImmGetCompositionFontA(hImc: HIMC; lpLogfont: PLOGFONTA): Boolean; stdcall;
function ImmGetCompositionFontW(hImc: HIMC; lpLogfont: PLOGFONTW): Boolean; stdcall;
function ImmGetCompositionFont(hImc: HIMC; lpLogfont: PLOGFONT): Boolean; stdcall;
function ImmSetCompositionFontA(hImc: HIMC; lpLogfont: PLOGFONTA): Boolean; stdcall;
function ImmSetCompositionFontW(hImc: HIMC; lpLogfont: PLOGFONTW): Boolean; stdcall;
function ImmSetCompositionFont(hImc: HIMC; lpLogfont: PLOGFONT): Boolean; stdcall;
function ImmConfigureIMEA(hKl: HKL; hWnd: HWND; dwMode: DWORD; lpData: pointer): Boolean; stdcall;
function ImmConfigureIMEW(hKl: HKL; hWnd: HWND; dwMode: DWORD; lpData: pointer): Boolean; stdcall;
function ImmConfigureIME(hKl: HKL; hWnd: HWND; dwMode: DWORD; lpData: pointer): Boolean; stdcall;
function ImmEscapeA(hKl: HKL; hImc: HIMC; uEscape: UINT; lpData: pointer): LRESULT; stdcall;
function ImmEscapeW(hKl: HKL; hImc: HIMC; uEscape: UINT; lpData: pointer): LRESULT; stdcall;
function ImmEscape(hKl: HKL; hImc: HIMC; uEscape: UINT; lpData: pointer): LRESULT; stdcall;
function ImmGetConversionListA(hKl: HKL; hImc: HIMC; lpSrc: PAnsiChar; lpDst: PCANDIDATELIST; dwBufLen: DWORD; uFlag: UINT ): DWORD; stdcall;
function ImmGetConversionListW(hKl: HKL; hImc: HIMC; lpSrc: PWideChar; lpDst: PCANDIDATELIST; dwBufLen: DWORD; uFlag: UINT ): DWORD; stdcall;
function ImmGetConversionList(hKl: HKL; hImc: HIMC; lpSrc: PChar; lpDst: PCANDIDATELIST; dwBufLen: DWORD; uFlag: UINT ): DWORD; stdcall;
function ImmNotifyIME(hImc: HIMC; dwAction, dwIndex, dwValue: DWORD): Boolean; stdcall;
function ImmGetStatusWindowPos(hImc: HIMC; var lpPoint : TPoint): Boolean; stdcall;
function ImmSetStatusWindowPos(hImc: HIMC; lpPoint: PPOINT): Boolean; stdcall;
function ImmGetCompositionWindow(hImc: HIMC; lpCompForm: PCOMPOSITIONFORM): Boolean; stdcall;
function ImmSetCompositionWindow(hImc: HIMC; lpCompForm: PCOMPOSITIONFORM): Boolean; stdcall;
function ImmGetCandidateWindow(hImc: HIMC; dwBufLen: DWORD; lpCandidate: PCANDIDATEFORM): Boolean; stdcall;
function ImmSetCandidateWindow(hImc: HIMC; lpCandidate: PCANDIDATEFORM): Boolean; stdcall;
function ImmIsUIMessageA(hWnd: HWND; msg: UINT; wParam: WPARAM; lParam: LPARAM): Boolean; stdcall;
function ImmIsUIMessageW(hWnd: HWND; msg: UINT; wParam: WPARAM; lParam: